package tj.eskhata.pos.domain;
// Generated 20.10.2010 10:08:06 by Hibernate Tools 3.3.0.GA


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

/**
 * Tarif generated by hbm2java
 */
@Entity
@Table(name="TARIF"
    ,schema="MTA"
)
public class Tarif  implements DomainObject {

     private Long id;
     private String code;
     private String name;
     private String coments;
     private Long tarif;
     private String percent;
     private Long tarifArrId;
     private Date tarifFdate;
     private Date tarifLdate;
     private BigDecimal maxSum;
     private BigDecimal minSum;
     private Long komisSumArrId;
     private Set<SprPaySystem> sprPaySystems = new HashSet<SprPaySystem>(0);

    public Tarif() {
    }

	
    public Tarif(Long id) {
        this.id = id;
    }
    public Tarif(Long id, String code, String name, String coments, Long tarif, String percent, Long tarifArrId, Date tarifFdate, Date tarifLdate, BigDecimal maxSum, BigDecimal minSum, Long komisSumArrId, Set<SprPaySystem> sprPaySystems) {
       this.id = id;
       this.code = code;
       this.name = name;
       this.coments = coments;
       this.tarif = tarif;
       this.percent = percent;
       this.tarifArrId = tarifArrId;
       this.tarifFdate = tarifFdate;
       this.tarifLdate = tarifLdate;
       this.maxSum = maxSum;
       this.minSum = minSum;
       this.komisSumArrId = komisSumArrId;
       this.sprPaySystems = sprPaySystems;
    }
   
     @Id 

    
    @Column(name="ID", unique=true, nullable=false, precision=22, scale=0)
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }

    
    @Column(name="CODE", length=20)
    public String getCode() {
        return this.code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }

    
    @Column(name="NAME", length=64)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }

    
    @Column(name="COMENTS", length=128)
    public String getComents() {
        return this.coments;
    }
    
    public void setComents(String coments) {
        this.coments = coments;
    }

    
    @Column(name="TARIF", precision=17)
    public Long getTarif() {
        return this.tarif;
    }
    
    public void setTarif(Long tarif) {
        this.tarif = tarif;
    }

    
    @Column(name="PERCENT", length=1)
    public String getPercent() {
        return this.percent;
    }
    
    public void setPercent(String percent) {
        this.percent = percent;
    }

    
    @Column(name="TARIF_ARR_ID", precision=22, scale=0)
    public Long getTarifArrId() {
        return this.tarifArrId;
    }
    
    public void setTarifArrId(Long tarifArrId) {
        this.tarifArrId = tarifArrId;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="TARIF_FDATE", length=7)
    public Date getTarifFdate() {
        return this.tarifFdate;
    }
    
    public void setTarifFdate(Date tarifFdate) {
        this.tarifFdate = tarifFdate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="TARIF_LDATE", length=7)
    public Date getTarifLdate() {
        return this.tarifLdate;
    }
    
    public void setTarifLdate(Date tarifLdate) {
        this.tarifLdate = tarifLdate;
    }

    
    @Column(name="MAX_SUM", precision=22, scale=0)
    public BigDecimal getMaxSum() {
        return this.maxSum;
    }
    
    public void setMaxSum(BigDecimal maxSum) {
        this.maxSum = maxSum;
    }

    
    @Column(name="MIN_SUM", precision=22, scale=0)
    public BigDecimal getMinSum() {
        return this.minSum;
    }
    
    public void setMinSum(BigDecimal minSum) {
        this.minSum = minSum;
    }

    
    @Column(name="KOMIS_SUM_ARR_ID", precision=22, scale=0)
    public Long getKomisSumArrId() {
        return this.komisSumArrId;
    }
    
    public void setKomisSumArrId(Long komisSumArrId) {
        this.komisSumArrId = komisSumArrId;
    }
    
    @OneToMany(fetch = FetchType.LAZY, mappedBy="tarif")
    public Set<SprPaySystem> getSprPaySystems() {
        return this.sprPaySystems;
    }
    
    public void setSprPaySystems(Set<SprPaySystem> sprPaySystems) {
        this.sprPaySystems = sprPaySystems;
    }




}


